PATHMac OS 8 Developer Documentation > Operating System Services > Multiprocessing Services >

Adding Multitasking Capability to Applications Using Multiprocessing Services

   

MPRegisterDebugger

Registers a debugger.

OSStatus MPRegisterDebugger (
                     MPQueueID queue,
                     MPDebuggerLevel level);
queue
A value of type MPQueueID that specifies the ID of the queue to which you want exception messages and other information to be sent.
level
A value of type MPDebuggerLevel that specifies the level of this debugger with respect to other debuggers. Exceptions and informational messages are sent first to the debugger with the highest level. If more than one debugger attempts to register at a particular level, only the first debugger is registered. Other attempts return an error.
function result
A result code. See Result Codes for a list of possible values. If the number of registered debuggers exceeds the system limit, the function returns kMPInsufficientResourcesErr .
DISCUSSION

Exception messages are sent when tasks are suspended. When a task exception occurs, Multiprocessing Services notifies registered debuggers and other handlers in the following order:

The notification moves to the next lower level when a debugger (or eventually the task's local exception handler) calls the MPDisposeTaskException function with the indication that the exception be propagated. The exception messages sent to the debugger's queue are in the same format as those described in MPSetExceptionHandler .

The system may implement a limited number of debugger slots. It is possible no debugger support is provided.

VERSION NOTES

Introduced with Multiprocessing Services 2.0.

SEE ALSO

The function MPUnregisterDebugger .


© 1999 Apple Computer, Inc. – (Last Updated 07 May 99)